<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="head(title)">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="shortcut icon" type="image/x-icon" th:href="@{/images/logo.jpg}"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet" th:href="@{/css/animate.css}">
    <link rel="stylesheet" th:href="@{/css/typo.css}">
    <link rel="stylesheet" th:href="@{/lib/editormd/css/editormd.css}">
    <link rel="stylesheet" th:href="@{/lib/editormd/css/editormd.preview.css}" />
    <link rel="stylesheet" th:href="@{/lib/prism/prism.css}">
    <link rel="stylesheet" th:href="@{/lib/tocbot/tocbot.css}">
    <link rel="stylesheet" th:href="@{/css/me.css}">

    <title th:replace="${title}">title</title>
</head>
<body>
<nav th:fragment="menu(n)" class="ui inverted vertical segment m-padding-tb-mini">
    <div class="ui m-container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui header item">SeekBlog</h2>
            <a th:href="@{/}" class="m-item item m-mobile-hide" th:classappend="${n==1}?'active'"><i class="home icon"></i>首页</a>
            <a th:href="@{/types/-1}" class="m-item item m-mobile-hide" th:classappend="${n==2}?'active'"><i class="idea icon"></i>分类</a>
            <a th:href="@{/tags/-1}" class="m-item item m-mobile-hide" th:classappend="${n==3}?'active'"><i class="tags icon"></i>标签</a>
            <a th:href="@{/archives}" class="m-item item m-mobile-hide" th:classappend="${n==4}?'active'"><i class="clone icon"></i>归档</a>
            <a th:href="@{/about}" class="m-item item m-mobile-hide" th:classappend="${n==5}?'active'"><i class="info icon"></i>关于我</a>
            <div class="right item m-mobile-hide">
                <form name="search" th:action="@{/search}" method="post" target="_blank">
                    <div class="ui icon input">
                        <input type="text" name="query" placeholder="Search...">
                        <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                    </div>
                </form>
            </div>
        </div>
        <a href="#" class="ui black button btn-sidebar m-top-right m-mobile-show m-margin-tb"><i class="sidebar icon" style="font-size: 22px;"></i></a>
    </div>
</nav>

<div th:fragment="content" class="ui attached segment">
    <div class="ui padded segment" th:each="blog : ${page.list}">
        <div class="ui mobile reversed stackable grid">
            <div class="eleven wide column">
                <h3 class="ui header"><a th:text="${blog.title}" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">title</a></h3>
                <div class="m-beyond-truncation" th:text="|${blog.introduce}|"><p class="m-text-lined">简介</p></div>
                <div class="ui grid">
                    <div class="eleven wide column">
                        <div class="ui horizontal link list">
                            <div class="item">
                                <img th:src="${blog.user.avatar}" alt="" class="ui avatar image">
                                <div class="content">
                                    <a th:href="@{/about}" target="_blank" class="header" th:text="${blog.user.nickname}">nickname</a>
                                </div>
                            </div>
                            <div class="item"><i class="calendar icon"></i><span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">updateTime</span></div>
                            <div class="item"><i class="eye icon"></i><span th:text="${blog.views}">views</span></div>
                        </div>
                    </div>
                    <div class="right aligned five wide column">
                        <a th:href="@{/types/{typeId}(typeId=${blog.typeId})}" target="_blank" class="ui teal basic label m-padding-tb-mini" th:text="${blog.type.name}">type</a>
                    </div>
                </div>
            </div>
            <div class="five wide column">
                <a th:href="@{/blog/{id}(id=${blog.id})}" target="_blank"><img th:src="${blog.firstPicture}" alt="首图" class="ui rounded image"></a>
            </div>
        </div>
    </div>
</div>

<footer th:fragment="footer" class="ui inverted vertical segment m-stick-bottom">
    <div class="ui center aligned container">
        <div class="ui stackable inverted divided grid">
            <div class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <img th:src="@{/images/wechat.jpg}" class="ui rounded image" alt="微信" style="width: 120px;">
                    </div>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header">new blog</h4>
                <div class="ui inverted link list">
                    <a href="" class="item m-opacity-mini">????</a>
                    <a href="" class="item m-opacity-mini">????</a>
                    <a href="" class="item m-opacity-mini">????</a>
                </div>
            </div>
            <div class="four wide column">
                <h4 class="ui inverted header">联系我</h4>
                <div class="ui inverted link list">
                    <a href="javascript:;" class="item m-opacity-mini">telephone:<span th:text="#{me.telephone}"></span></a>
                    <a href="javascript:;" class="item m-opacity-mini">Email:<span th:text="#{me.email}"></span></a>
                    <a href="javascript:;" class="item m-opacity-mini">QQ:<span th:text="#{me.qq}"></span></a>
                    <a href="javascript:;" class="item m-opacity-mini">WeChat:<span th:text="#{me.wechat}"></span></a>
                </div>
            </div>
            <div class="six wide column">
                <h4 class="ui inverted header">SeekBlog</h4>
                <p class="ui inverted m-opacity-mini">本博客是使用springboot与mybatis实现的，数据库采用的是MySQL，前端页面用的是semantic-ui，集合了markdown插件，使用tocbot插件生成文章目录</p>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <p>Copyright <i class="copyright outline icon"></i>2020-2021 Seek Designed by Seek</p>
    </div>
</footer>

<th:block th:fragment="script">
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
    <script th:src="@{/lib/prism/prism.js}"></script><!--代码高亮-->
    <script th:src="@{/lib/tocbot/tocbot.js}"></script><!--目录生成-->
    <script th:src="@{/lib/qrcode/qrcode.js}"></script><!--二维码生成-->

    <!--文本转换html-->
    <script th:src="@{/lib/editormd/lib/marked.min.js}"></script>
    <script th:src="@{/lib/editormd/lib/prettify.min.js}"></script>
    <script th:src="@{/lib/editormd/lib/raphael.min.js}"></script>
    <script th:src="@{/lib/editormd/lib/underscore.min.js}"></script>
    <script th:src="@{/lib/editormd/lib/sequence-diagram.min.js}"></script>
    <script th:src="@{/lib/editormd/lib/flowchart.min.js}"></script>
    <script th:src="@{/lib/editormd/lib/jquery.flowchart.min.js}"></script>
    <script th:src="@{/lib/editormd/editormd.js}"></script>

    <script th:src="@{/js/me.js}"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/2.1.3/jquery.scrollTo.min.js"></script>
</th:block>
</body>
</html>
